// ProgressBarDialog.cpp : implementation file
//

#include "stdafx.h"
#include "JA2IniEditor.h"
#include "ProgressBarDialog.h"


// CProgressBarDialog dialog

IMPLEMENT_DYNAMIC(CProgressBarDialog, CDialog)

CProgressBarDialog::CProgressBarDialog(CWnd* pParent /*=NULL*/)
	: CDialog(CProgressBarDialog::IDD, pParent)
{
  memset( m_szLastFileName, 0, sizeof(m_szLastFileName));
}

CProgressBarDialog::~CProgressBarDialog()
{
}

void CProgressBarDialog::DoDataExchange(CDataExchange* pDX)
{
  CDialog::DoDataExchange(pDX);
  DDX_Control(pDX, IDC_PROGRESS1, m_pcProgressBar);
  DDX_Control(pDX, IDC_ProgressBarStatic, m_statProgressText);
}

void CProgressBarDialog::SetState( int nProgressPoint, char * szLoadedFile/*=NULL*/)
{
  m_pcProgressBar.SetPos( nProgressPoint );

  if ( szLoadedFile )
  {
    if ( strcmp( m_szLastFileName, szLoadedFile ) )
      strcpy( m_szLastFileName, szLoadedFile );
  }
  SetDlgItemText( IDC_ProgressBarStatic, m_szLastFileName );  
}

BEGIN_MESSAGE_MAP(CProgressBarDialog, CDialog)
END_MESSAGE_MAP()


// CProgressBarDialog message handlers
